<template>
  <div>ueditor
    <ue :defaultMsg="defaultMsg" :config="config" ref="ue"></ue>
    <button @click="getContent">获取内容</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      defaultMsg: '这里是UE测试',
      config: {
        initialFrameWidth: null,
        initialFrameHeight: 350
      }
    }
  },
  mounted () {
    this.ue = this.$refs.ue
    this.ue.setContent('<h1>hello<p>aaaaaaaaaaaaaaaaaaa</p></h1>')
  },
  components: {
    ue: require('./ueditor.vue').default
  },
  methods: {
    getContent () {
      console.log(this.ue.getContent(false))
    }
  }
}
</script>
